<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/web/header.jsp" %>
<title>部门信息添加</title>
</head>
<body>
<fieldset class="layui-elem-field" style="margin:20px; padding:15px;">
    <legend>信息维护--添加信息</legend>
     <form class="layui-form" method="post"> 
         <hr class="layui-bg-blak"/>
         <div class="layui-form-item">
             <label class="layui-form-label">编号 <span class="required" style="color:red">*</span></label>
             <div class="layui-input-inline">
                 <input type="text" name="code" autocomplete="off"  class="layui-input" lay-verify="required" checked placeholder="请输入编号" >
             </div>
         </div><br />
         <div class="layui-form-item">
             <label class="layui-form-label">名称  <span class="required" style="color:red">*</span></label>
             <div class="layui-input-inline">
                 <input type="text" name="name" class="layui-input" lay-verify="required" placeholder="请输入名称" required>
             </div>
         </div><br />
         <div class="layui-form-item">
             <label class="layui-form-label">电话 </label>
             <div class="layui-input-inline">
                 <input type="text" name="tel" class="layui-input" placeholder="请输入电话" required>
             </div>
         </div><br />
         <div class="layui-form-item">
             <div class="layui-input-block">
                 <input type="button" class="layui-btn" lay-submit lay-filter="add" value="确认">
                 <input type="reset" class="layui-btn layui-btn-primary" value="重置">
                 <input type="button" class="layui-btn" onclick="closeThis()" value="取消">
             </div>
         </div>
         <input type="hidden" name="action" value="add">
     </form>
</fieldset>

<script type="text/javascript">

formSubmit('/department','submit(add)','text',function(data){
	if("repeat" == data){
		layer.msg("编号重复");
	}else if(1 == data){
		layer.msg("添加成功", closeThis);
	}
	else{
		layer.msg("添加失败");
	} 
});




</script>
</body>
</html>